#include "bcpp_seq_formats.h"
#include <stdexcept>
namespace BioCPP
{

void select_sequence_file_format(const char arg, eSEQ_FORMAT& format, const std::string& name)
{
	switch (arg)
	{
		case 'f':
			format= eSF_FASTA;
			break;
		case 'c':
			format= eSF_CLUSTAL;
			break;
		case 'p':
			format= eSF_PHYLIP;
			break;
		case 'n':
			format= eSF_PHYLIP_NONINTERLEAVED;
			break;
		case 't':
			format= eSF_TABDELIMITED;
			break;
		default:
			throw std::runtime_error(
								"The " + name + " data format must be one of \n"
								"\tf    : FASTA\n"
								"\tc    : CLUSTALW\n"
								"\tp    : Phylip / PAML\n"
								"\tn    : Non-interleaved Phylip\n"
								"\tt    : Tab-delimited.\n");

	}
}
}

